package com.cai.kcsj.service.impl;

import com.cai.kcsj.entity.Goods;
import com.cai.kcsj.mapper.GoodsMapper;
import com.cai.kcsj.service.GoodsServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/1/4 18 : 26
 * @package：com.cai.kcsj.service.impl
 */
@Service
public class GoodsServerImpl implements GoodsServer {
    @Autowired
    private GoodsMapper goodsMapper;
    @Override
    public List<Goods> selectGoodsList(Integer current) {

        return goodsMapper.selectGoodsList(current);
    }

    @Override
    public Goods selectGoodsById(Integer id) {

        return goodsMapper.selectGoodsById(id);
    }

    @Override
    public void insertGoods(Goods goods) {
        goodsMapper.insertGoods(goods);
    }

    @Override
    public int getGoodsCount() {
        return goodsMapper.getGoodsCount();
    }

    @Override
    public void updateGoods(Goods goods) {
        goodsMapper.updateGoods(goods);
    }
}
